package net.lahuobao.shunting.service;

import net.lahuobao.shunting.common.model.PageData;

import java.util.List;

/**
 * 业务处理基类
 * Created by zoyation
 * Date:2017/1/24
 * Time:11:33
 */
public class BaseService {

    /**
     * 组装分页数据
     * @param rows 数据总条数
     * @param list 当前数据列表
     * @return
     */
    protected PageData getPageData(int rows, List list) {
        PageData dataGrid = new PageData();
        dataGrid.setResults(list);
        dataGrid.setTotal(rows);
        return dataGrid;
    }
}
